//
//  Header.h
//  SpeechRecognition
//
//  Created by 张云江 on 2019/9/28.
//  Copyright © 2019年 张云江. All rights reserved.
//

#ifndef Header_h
#define Header_h

// 输出日志 (格式: [时间] [哪个方法] [哪行] [输出内容])
#ifdef DEBUG
#define NSLog(format, ...) printf("\n[%s] %s [第%d行] 💕 %s\n", __TIME__, __FUNCTION__, __LINE__, [[NSString stringWithFormat:format, ##__VA_ARGS__] UTF8String]);
#else
#define NSLog(format, ...)
#endif

// 日记输出宏
#ifdef DEBUG // 调试状态, 打开LOG功能
#define MLog(...) NSLog(__VA_ARGS__)
#else // 发布状态, 关闭LOG功能
#define MLog(...)
#endif

//屏幕高
#define kScreenHeight [UIScreen mainScreen].bounds.size.height

//屏幕宽
#define kScreenWidth [UIScreen mainScreen].bounds.size.width

//iPhone X系列
#define kIphoneXBool [[UIApplication sharedApplication] statusBarFrame].size.height == 44.0 ? YES : NO

//状态栏高度
#define kStatusBarHeight ([[UIApplication sharedApplication] statusBarFrame].size.height == 44.0 ? 44.0 : 20.0)

//底部触摸条高度 针对iPhone X系列
#define kBottomHeight ([[UIApplication sharedApplication] statusBarFrame].size.height == 44.0 ? 34.0 : 0.0)

//导航栏高度
#define kNavigationHeight ([[UIApplication sharedApplication] statusBarFrame].size.height == 44.0 ? 88.0 : 64.0)

//颜色
#define kRGBCOLOR(r,g,b) [UIColor colorWithRed:r/255.0 green:g/255.0 blue:b/255.0 alpha:1]

#define kRGBACOLOR(r,g,b,a) [UIColor colorWithRed:r/255.0 green:g/255.0 blue:b/255.0 alpha:a]

#define kUIColorFromRGB(rgbValue) [UIColor colorWithRed:((float)((rgbValue & 0xFF0000) >> 16))/255.0 green:((float)((rgbValue & 0xFF00) >> 8))/255.0 blue:((float)(rgbValue & 0xFF))/255.0 alpha:1.0]

#define kUIColorFromRGA(rgbValue,a) [UIColor colorWithRed:((float)((rgbValue & 0xFF0000) >> 16))/255.0 green:((float)((rgbValue & 0xFF00) >> 8))/255.0 blue:((float)(rgbValue & 0xFF))/255.0 alpha:(a)]

#define kRatio(f) [UIScreen mainScreen].bounds.size.width / 375 * f

#define kVipBool [[[NSUserDefaults standardUserDefaults] objectForKey:@"vipBool"] boolValue]

#define kBaseUrl @"http://apicall.id-photo-verify.com/api/"

#define kAppkey @"883b02f3e7a72b5841848dd9c566a82667b9c2b2"

#define kAppkey2 @"2c99dab5b5b14e468c551af415b5be58e0e578d9"

#define kPrivacyPolicy @"http://stu.yhjygs.com/7091682735704fc09e731b30da8871fe.html"

#define kTermsofUse @"http://stu.yhjygs.com/f85ed1c61a7a49ac82ac6e44f979992e.html"

#endif /* Header_h */
